#include <iostream>
using std::cout;
using std::endl;

class A
{
public:
 void FuncA()
 {
     printf( "FuncA called\n" );
 }
 virtual void FuncB()
 {
     printf( "FuncB called\n" );
 }
};

class B
: public A
{
public:
 void FuncA()
 {
     A::FuncA();
     printf( "FuncAB called\n" );
 }

 virtual void FuncB()
 {
     printf( "FuncBB called\n" );
 }
};

int main( void )
{
	B	b;
	A	*pa;
	pa = &b;
	A *pa2 = new A();
	pa->FuncA(); //（ 3）  //FuncA called
	pa->FuncB(); //（ 4） //FuncBB called
	pa2->FuncA(); //（ 5）//FuncA called
	pa2->FuncB();  //FuncB called
	delete pa2;
	return 0;
}
